/**
 * 
 */
package com.wilmar.process.entity;

import java.io.Serializable;

/**
 * 用户所要保存的对应数据库的pojo类的信息
 * 
 * @author MaKuBEX E-mail:makubexnet@gmail.com
 * @version 1.0.0 at Aug 4, 2009 1:27:42 PM
 * 
 */
public class PojoInformation implements Serializable {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = 4006727303075829100L;

	/**
	 * pojo类的完整名称
	 */
	private String clazzName;

	/**
	 * pojo类的别名
	 */
	private String alias;

	/**
	 * 完整构造函数
	 * 
	 * @param clazzName
	 *            pojo类的完整名称
	 * @param alias
	 *            pojo类的别名
	 */
	public PojoInformation(String clazzName, String alias) {
		super();
		this.clazzName = clazzName;
		this.alias = alias;
	}

	/**
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PojoInformation other = (PojoInformation) obj;
		if (clazzName == null) {
			if (other.clazzName != null)
				return false;
		} else if (!clazzName.equals(other.clazzName))
			return false;
		return true;
	}

	/**
	 * @return the alias
	 */
	public String getAlias() {
		return alias;
	}

	/**
	 * @return the clazzName
	 */
	public String getClazzName() {
		return clazzName;
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((clazzName == null) ? 0 : clazzName.hashCode());
		return result;
	}

	/**
	 * @param alias
	 *            the alias to set
	 */
	public void setAlias(String alias) {
		this.alias = alias;
	}

	/**
	 * @param clazzName
	 *            the clazzName to set
	 */
	public void setClazzName(String clazzName) {
		this.clazzName = clazzName;
	}
}
